%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\chapter{Examples of coupled cluster calculations}
\label{ch:ccexamples}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

We collect in this Chapter a few examples of input files (\dalinp) 
for calculations one might want to carry 
out with the \cc\ modules of the \dalton\ program.
Other examples may be found in the test suite. 

It should be stressed that %in difference to the \resp \ code,
all modules in \cc\ can be used 
simultaneously---assuming they are all implemented
for the chosen wavefunction model(s).
For instance,  linear, quadratic and cubic response functions 
can be obtained within the same calculation.

\section{Multiple model energy calculations}
%
\cc\  allows for the calculation of the ground state energy
of the given system using a variety of wavefunction models, listed in 
Section~\ref{sec:ccgeneral}. 
For any model specified, the Hartree--Fock energy is always calculated. 
The following input describes the calculation of SCF, MP2, CCSD and 
CCSD(T) ground state energies:
%
\begin{verbatim}
**DALTON INPUT
.RUN WAVE FUNCTIONS
**WAVE FUNCTIONS
.CC
*CC INPUT
.MP2              
.CCSD
.CC(T)
**END OF DALTON INPUT
\end{verbatim}
Note that SCF, MP2 and CCSD energies are obtained by default if 
CCSD(T) (\Key{CC(T)}) is required. Therefore the 
keywords \Key{MP2} and \Key{CCSD}
may also be omitted in the previous example.

\section{First-order property calculation}

The following input exemplifies the calculation of all orbital-relaxed
first-order one-electron properties available in \cc, for the hierarchy of 
wavefunction models SCF (indirectly obtained through CCS), MP2, CCSD and CCSD(T).
For details, see Section~\ref{sec:ccfop}.
\begin{verbatim}
**DALTON INPUT
.RUN WAVE FUNCTIONS
**INTEGRALS
.DIPLEN
.SECMOM
.THETA
.EFGCAR
.DARWIN
.MASSVELO
**WAVE FUNCTIONS
.CC
*CC INPUT
.CCS              (gives SCF First order properties)
.MP2              (default if CCSD is calculated)
.CCSD
.CC(T)
*CCFOP
.ALLONE
**END OF DALTON INPUT
\end{verbatim}

\section{Static and frequency-dependent dipole polarizabilities and
            corresponding dispersion coefficients} 

The following input describes the calculation of the 
electric dipole polarizability component $\alpha_{zz}(\omega)$, 
for $\omega = 0.00$ and $\omega=0.072$ au, and its dispersion
coefficients up to order 6, in the hierarchy of CC models
CCS, CC2 and CCSD. 
The calculation of the electric dipole moment has been
included in the same run.

\begin{verbatim}
**DALTON INPUT
.RUN WAVE FUNCTIONS
**INTEGRALS
.DIPLEN
**WAVE FUNCTIONS
.CC
*CC INPUT
.CCS              
.CC2             
.CCSD
*CCFOP
.DIPMOM
*CCLR
.OPERATOR
ZDIPLEN ZDIPLEN
.FREQUENCIES
  2
0.00  0.072
.DISPCF
  6
**END OF DALTON INPUT
\end{verbatim}

\section{Static and frequency-dependent dipole hyperpolarizabilities 
            and corresponding dispersion coefficients} 

The previous input can be extended to include the 
calculation of the electric first and second hyperpolarizability components 
$\beta_{zzz}(\omega_1,\omega_2)$ and 
$\gamma_{zzzz}(\omega_1,\omega_2,\omega_3)$, 
for $\omega_1 = \omega_2 =(\omega_3 =) \ 0.00$ 
and $\omega_1 = \omega_2 =(\omega_3 =) \ 0.072$ au. 
The corresponding dispersion coefficients up to sixth order 
are also calculated.
For other specific cases, see Sections~\ref{sec:ccqr} and \ref{sec:cccr}

\begin{verbatim}
**DALTON INPUT
.RUN WAVE FUNCTIONS
**INTEGRALS
.DIPLEN
**WAVE FUNCTIONS
.CC
*CC INPUT
.CCS
.CC2
.CCSD
*CCFOP
.DIPMOM
*CCLR
.OPERATOR
ZDIPLEN ZDIPLEN
.FREQUENCIES
  2
0.00  0.072
.DISPCF
  6
*CCQR
.OPERATOR
ZDIPLEN ZDIPLEN ZDIPLEN
.MIXFRE
  2
0.00  0.072                      !omega_1
0.00  0.072                      !omega_2
*CCCR
.OPERATOR
ZDIPLEN ZDIPLEN ZDIPLEN ZDIPLEN
.MIXFRE
  2
0.00  0.072                      !omega_1
0.00  0.072                      !omega_2
0.00  0.072                      !omega_3
.DISPCF
 6
**END OF DALTON INPUT
\end{verbatim}
Obviously, linear, quadratic and cubic response modules can also be
run separately. 

\section{Excitation energies and oscillator strengths}
We collect here input examples for the calculation of singlet excitation energies and
oscillator strengths for a system with \verb+NSYM = 2+ (C$_s$) in the UV-vis
region.
Two alternative modules can be activated, \verb+*CCLRSD+ and \verb+*CCOPA+,
which produce slightly different output formats.
The \verb+*CCOPA+ module should be used for transition strengths using CC3.
This is the \verb+*CCLRSD+ example
\begin{verbatim}
**DALTON INPUT
.RUN WAVE FUNCTIONS
**INTEGRAL
.DIPLEN
**WAVE FUNCTIONS
.CC
*CC INPUT
.CCSD
.NSYM
 2
*CCEXCI
.NCCEXCI                !number of excited states
 2 1                    !2 states in symmetry 1 and 1 state in symmetry 2
*CCLRSD
.DIPOLE
**END OF DALTON INPUT
\end{verbatim}  
This is the \verb+*CCOPA+ example
\begin{verbatim}
**DALTON INPUT
.RUN WAVE FUNCTIONS
**INTEGRAL
.DIPLEN
**WAVE FUNCTIONS
.CC
*CC INPUT
.CCSD
.NSYM
 2
*CCEXCI
.NCCEXCI                !number of excited states
 2 1                    !2 states in symmetry 1 and 1 state in symmetry 2
*CCOPA
.DIPOLE
**END OF DALTON INPUT
\end{verbatim}  
Triplet excitation energies can be obtained adding
an extra line to \Key{NCCEXCI} specifying the number 
of required triplet excited states for each symmetry class.  
%Linear residues are not available
%for triplet states (The \Sec{CCLRSD} sections should be removed).
\subsection{Excitation energies (and strengths) of core excited states}
Core excited states can be accessed within the CC code
by activating the core-valence separation in the \verb+*CCEXCI+
section of the input. The \verb+*CCOPA+ and \verb+CCLRSD+ 
inputs remain the same.
In the example below, it is assumed that we want to access 
core excitations 
from the first core orbital in symmetry 1.
\begin{verbatim}
**DALTON INPUT
.RUN WAVE FUNCTIONS
**INTEGRAL
.DIPLEN
**WAVE FUNCTIONS
.CC
*CC INPUT
.CCSD
.NSYM
 2
*CCEXCI
.NCCEXCI                !number of excited states
2 1                     !2 states in symmetry 1 and 1 state in symmetry 2
.CVSEPARATION
1 0                     !number of active core orbitals per irrep
1                       !core orbital 1 in irrep/sym 1
0                       !no core orbitals active in sym 2
*CCOPA
.DIPOLE
**END OF DALTON INPUT
\end{verbatim}  


\section{Gradient calculation, geometry optimization}
Available for CCS, CC2, MP2, CCSD and CCSD(T) using integral direct analytic gradient.

\noindent For a single integral-direct gradient calculation:
\begin{verbatim}
**DALTON INPUT
.DIRECT
.RUN WAVE FUNCTIONS
**INTEGRAL
.DIPLEN
.DEROVL
.DERHAM
**WAVE FUNCTIONS
.CC
*CC INP
.CCSD
*DERIVATIVES
**END OF DALTON INPUT
\end{verbatim}
Note that if several wavefunction models are specified, 
the gradient calculation is performed only for the ``lowest-level" 
model in the list.

\noindent For a geometry optimization:
\begin{verbatim}
**DALTON INPUT
.OPTIMIZE
**INTEGRAL
.DIPLEN
.DEROVL
.DERHAM
**WAVE FUNCTIONS
.CC
*CC INPUT
.CC(T)
**END OF DALTON INPUT
\end{verbatim}

%\section{Excited state geometry optimization}
\section{R12 methods}

\noindent At present available at the MP2 level. The input for
an MP2-R12/A calculation is as follows (the key \Key{R12AUX} is used only if
an auxiliary basis is employed):
\begin{verbatim}
**DALTON INPUT
.DIRECT
.RUN WAVE FUNCTIONS
*MOLBAS
.R12AUX
**INTEGRAL
.R12
**WAVE FUNCTIONS
.CC
*CC INPUT
.MP2
*R12
.NO A'
.NO B
**END OF DALTON INPUT
\end{verbatim}
